﻿using System;
using System.Collections.Generic;
using System.Text;
using Rison.Utilities.TaskManager;
using System.Collections;
namespace SalePoints.AutoTask
{
	/// <summary>
	/// 统计麦网、邮购、健康、门店四个渠道昨天、上周的每小时的毛订单金额
	/// </summary>
	public class SalePointsHourly:TaskBase
	{
		protected override ArrayList GetData()
		{
			ArrayList list = new ArrayList();
			list.Add(1);//dummy object,no actual use
			return list;
		}
		protected override void SingleProcess(object o)
		{
			using (AsmxSalePoint.SalePoint proxy = new AsmxSalePoint.SalePoint())
			{
				proxy.Timeout =600000;
				var msg = proxy.StatHourly(DateTime.Now.Date);
				if (!string.IsNullOrEmpty(msg)) {
					throw new Exception(msg);
				}
			}
		}
	}
}
